home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 002 / local.h < prev    next >
Text File  |  1985-06-03  |  2KB  |  52 lines

  1.  
  2.  
  3. /***********************************************************************/
  4. /* PROGRAM NAME   : local.h         * AUTHOR       : Harry Foxwell     */
  5. /* SOURCE LANGUAGE: C (ISC)         * LAST REVISION: 9/1/83            */
  6. /***********************************************************************/
  7. /* DESCRIPTION: Definitions for inclusion in C programs listed in      */
  8. /*              Learning to Program in C, by Thomas Plum, page 12.9    */
  9. /*                                                                     */
  10. /*                                                                     */
  11. /***********************************************************************/
  12. /* EXTERNAL CALLS/LINKS:            * INPUT  FILES: none               */
  13. /*                                  *                                  */
  14. /*           stdio.h                * OUTPUT FILES: none               */
  15. /*                                  *                                  */
  16. /***********************************************************************/
  17.  
  18. #ifndef FAIL
  19.  
  20. #include <stdio.h>
  21.  
  22. #define SUCCEED         0
  23. #define FAIL            1
  24.  
  25. #define FOREVER         for (;;)
  26.  
  27. #define NO              0
  28. #define YES             1
  29.  
  30. #define STDIN           0
  31. #define STDOUT          1
  32. #define STDERR          2
  33.  
  34. #define bits            ushort
  35. #define bool            int
  36. #define metachar        short
  37. #define tbool           char
  38. #define ushort          unsigned
  39. #define void            int
  40.  
  41. #define getln(s,n)      ((fgets(s,n,stdin) == NULL) ? EOF : strlen(s))
  42.  
  43. #define ABS(x)          (((x) < 0) ? -(x) : (x))
  44. #define MAX(x,y)        (((x) < (y)) ? (y) : (x))
  45. #define MIN(x,y)        (((x) < (y)) ? (x) : (y))
  46.  
  47. #endif
  48. /***********************************************************************/
  49. IN(x,y)        (((x) < (y)) ? (x) : (y))
  50.  
  51. #endif
  52. /*******************************************